//ankur

debugger;
matches = google.contentmatch.getContentMatches();
var matchList = document.createElement('UL');
var listItem;
var extractedText;

//<!-- Iterate through the array and display output for each match. -->
debugger;
for (var match in matches) {
    for (var key in matches[match]) {
        listItem = document.createElement('LI');
        extractedText = document.createTextNode(key + ": " + matches[match][key]);
        if (matches[match][key] == "amalhotra@ivp.in") {
            console.log("ASd");
            debugger;
            $('#widgetBody').show();
            gadgets.window.adjustHeight(100);
        } else {
            $('#widgetBody').hide();
            gadgets.window.adjustHeight(0);
        }

        listItem.appendChild(extractedText);
        matchList.appendChild(listItem);

    }
}
document.body.appendChild(matchList);


